<?php
// @filename   js_helper.php
// @version    1.0
// @author     洪明伟@shstorm
// @contact    hongmingwei@shstorm.com
// @update     2009-08-81
// @comment    js辅助函数

/*--------------------------------JS相关功能-------------------------------*/
	//JS弹出框
	function alert($str){
		echo "<script type='text/javascript'>alert('".$str."')</script>";
	}

	//JS_GO跳转
	function go($url){
		echo "<script type='text/javascript'>window.location.href='".$url."';</script>";
	}
	//JS_GO_TOP跳转
	function go_top($url){
		echo "<script type='text/javascript'>window.top.location.href='".$url."';</script>";
	}
	//back前进后退
	function back(){
		echo "<script type='text/javascript'>window.history.back();</script>";
	}
	function alert_go($str,$url){
		alert($str);
		go($url);	
	}//end alert_go();
	function alert_go_top($str,$url){
		alert($str);
		go_top($url);	
	}//end alert_go_top();
	function alert_back($str){
		alert($str);
		back();	
	}//end alert_back();

?>